﻿using System;


namespace TopBuilds.Restaurant.Data
{
    public class Product
    {
        #region 属性
        private int _id;
        private int _productCategoryId;
        private int _productSetId;
        private string _userDefinedId;
        private string _name;
        private float _price;
        private float _specialPrice;
        private int _discountOptionId;
        private int _salePromotionId;
        private int _isSet;
        private int _allowBillDiscount;
        #endregion 

        #region 构造
        public Product()
        {
            _productCategoryId        = 0;
            _productSetId             = 0;
            _userDefinedId            = null;
            _name                     = null;
            _price                    = 0;
            _specialPrice             = 0;
            _discountOptionId         = 0;
            _salePromotionId          = 0;
            _isSet                    = 0;
            _allowBillDiscount        = 0;
        }

        public Product(int productCategoryId)
        {
            _productCategoryId        = productCategoryId;
            _productSetId             = 0;
            _userDefinedId            = null;
            _name                     = null;
            _price                    = 0;
            _specialPrice             = 0;
            _discountOptionId         = 0;
            _salePromotionId          = 0;
            _isSet                    = 0;
            _allowBillDiscount        = 0;
        }

        public Product(int productCategoryId, int productSetId)
        {
            _productCategoryId        = productCategoryId;
            _productSetId             = productSetId;
            _userDefinedId            = null;
            _name                     = null;
            _price                    = 0;
            _specialPrice             = 0;
            _discountOptionId         = 0;
            _salePromotionId          = 0;
            _isSet                    = 0;
            _allowBillDiscount        = 0;
        }

        public Product(int productCategoryId, int productSetId, string userDefinedId)
        {
            _productCategoryId       = productCategoryId;
            _productSetId            = productSetId;
            _userDefinedId           = userDefinedId;
            _name                    = null;
            _price                   = 0;
            _specialPrice            = 0;
            _discountOptionId        = 0;
            _salePromotionId         = 0;
            _isSet                   = 0;
            _allowBillDiscount       = 0;
        }

        public Product(int productCategoryId, int productSetId, string userDefinedId,string name)
        {
            _productCategoryId       = productCategoryId;
            _productSetId            = productSetId;
            _userDefinedId           = userDefinedId;
            _name                    = name;
            _price                   = 0;
            _specialPrice            = 0;
            _discountOptionId        = 0;
            _salePromotionId         = 0;
            _isSet                   = 0;
            _allowBillDiscount       = 0;
        }

        public Product(int productCategoryId, int productSetId, string userDefinedId, string name,float price)
        {
            _productCategoryId       = productCategoryId;
            _productSetId            = productSetId;
            _userDefinedId           = userDefinedId;
            _name                    = name;
            _price                   = price;
            _specialPrice            = 0;
            _discountOptionId        = 0;
            _salePromotionId         = 0;
            _isSet                   = 0;
            _allowBillDiscount       = 0;
        }

        public Product(int productCategoryId, int productSetId, string userDefinedId, string name, float price, float specialPrice)
        {
            _productCategoryId       = productCategoryId;
            _productSetId            = productSetId;
            _userDefinedId           = userDefinedId;
            _name                    = name;
            _price                   = price;
            _specialPrice            = specialPrice;
            _discountOptionId        = 0;
            _salePromotionId         = 0;
            _isSet                   = 0;
            _allowBillDiscount       = 0;
        }

        public Product(int productCategoryId, int productSetId, string userDefinedId, string name, float price, float specialPrice, int discountOptionId)
        {
            _productCategoryId       = productCategoryId;
            _productSetId            = productSetId;
            _userDefinedId           = userDefinedId;
            _name                    = name;
            _price                   = price;
            _specialPrice            = specialPrice;
            _discountOptionId        = discountOptionId;
            _salePromotionId         = 0;
            _isSet                   = 0;
            _allowBillDiscount       = 0;
        }

        public Product(int productCategoryId, int productSetId, string userDefinedId, string name, float price, float specialPrice, int discountOptionId, int salePromotionId)
        {
            _productCategoryId       = productCategoryId;
            _productSetId            = productSetId;
            _userDefinedId           = userDefinedId;
            _name                    = name;
            _price                   = price;
            _specialPrice            = specialPrice;
            _discountOptionId        = discountOptionId;
            _salePromotionId         = salePromotionId;
            _isSet                   = 0;
            _allowBillDiscount       = 0;
        }

        public Product(int productCategoryId, int productSetId, string userDefinedId, string name, float price, float specialPrice, int discountOptionId, int salePromotionId, int isSet)
        {
            _productCategoryId       = productCategoryId;
            _productSetId            = productSetId;
            _userDefinedId           = userDefinedId;
            _name                    = name;
            _price                   = price;
            _specialPrice            = specialPrice;
            _discountOptionId        = discountOptionId;
            _salePromotionId         = salePromotionId;
            _isSet                   = isSet;
            _allowBillDiscount       = 0;
        }

        public Product(int productCategoryId, int productSetId, string userDefinedId, string name, float price, float specialPrice, int discountOptionId, int salePromotionId, int isSet, int allowBillDiscount)
        {
            _productCategoryId       = productCategoryId;
            _productSetId            = productSetId;
            _userDefinedId           = userDefinedId;
            _name                    = name;
            _price                   = price;
            _specialPrice            = specialPrice;
            _discountOptionId        = discountOptionId;
            _salePromotionId         = salePromotionId;
            _isSet                   = isSet;
            _allowBillDiscount       = allowBillDiscount;
        }
        #endregion

        public int Id
        {
            get { return _id; }
            set { _id = value; }
        }

        public int ProductCategoryId
        {
            get { return _productCategoryId; }
            set { _productCategoryId = value; }
        }

        public int ProductSetId
        {
            get { return _productSetId; }
            set { _productSetId = value; }
        }

        public string UserDefinedId
        {
            get { return _userDefinedId; }
            set { _userDefinedId = value; }
        }

        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }

        public float Price
        {
            get { return _price; }
            set { _price = value; }
        }

        public float SpecialPrice
        {
            get { return _specialPrice; }
            set { _specialPrice = value; }
        }

        public int DiscountOptionId
        {
            get { return _discountOptionId; }
            set { _discountOptionId = value; }
        }

        public int SalePromotionId
        {
            get { return _salePromotionId; }
            set { _salePromotionId = value; }
        }

        public int IsSet
        {
            get { return _isSet; }
            set { _isSet = value; }
        }

        public int AllowBillDiscount
        {
            get { return _allowBillDiscount; }
            set { _allowBillDiscount = value; }
        }
        public override string ToString()
        {
            return Name;
        }
    }
}
